<?php

namespace app\common\model;

class ShopPromotionAuctionLogModel extends BaseModel
{
    protected $name = 'shop_promotion_auction_log'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改
    protected $type = [];//类型管理

    protected function getUsernameAttr($value, $data)
    {
        $model = new UserModel();
        return $model->where('uid', $data['member_uid'])->value('username');
    }
    protected function getGoodsNameAttr($value,$data){
        $model=new ShopGoodsModel();
        return $model->where('goods_id',$data['goods_id'])->value('goods_name');
    }

}